package service;

import entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import dao.FirendMapper;
import entity.Firend;
import service.FirendService;

import java.util.List;

@Service
public class FirendServiceImpl implements FirendService{
@Autowired
private FirendMapper firendMapper;
//模糊查询
    @Override
    public List<User> getUserList(int uid,String uname, int start, int pageSize) {
        return firendMapper.getUserList(uid,uname,start,pageSize);
    }

    //查个数
    @Override
    public int getCount(String name) {
        return firendMapper.getCount(name);
    }

    //模糊查询
    @Override
    public int getCounta(int uname) {
        return  firendMapper.getCounta(uname);
    }

    //分页  列表
    @Override
    public List<User> getUserLists(String name,int start, int pageSize,List<Integer> li) {
        return firendMapper.getUserLists(name,start,pageSize,li);
    }

    //修改密码
    @Override
    public int getUpdate(User user) {
        return firendMapper.getUpdate(user);
    }

    //查id
    @Override
    public User getUserId(Integer uid) {
        return firendMapper.getUserId(uid);
    }

    @Override
    public int delUser(Integer uid) {
        return firendMapper.delUser(uid);
    }

    @Override
    public List<Integer> z_selectfriend(int id) {
        return firendMapper.z_selectfriend(id);
    }

    @Override
    public int tianyou(int i, int id) {
        return firendMapper.tianyou(i,id);
    }
    public int shanyou(int id){
        return firendMapper.shanyou(id);
    }
}
